<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../index.html">Index</a></li>
	
</ul>


<!-- Module list -->



<!-- File list -->

<h1>Files</h1>
<ul>

	<li><strong>Compiler.lua</strong></li>
	
	<li>
		<a href="../files/Editor.html">Editor.lua</a>
	</li>

	<li>
		<a href="../files/Instance.html">Instance.lua</a>
	</li>

	<li>
		<a href="../files/Libraries.html">Libraries.lua</a>
	</li>

	<li>
		<a href="../files/Permissions.html">Permissions.lua</a>
	</li>

	<li>
		<a href="../files/Preprocessor.html">Preprocessor.lua</a>
	</li>

	<li>
		<a href="../files/SFLib.html">SFLib.lua</a>
	</li>

	<li>
		<a href="../files/libs_cl/ents.html">libs_cl/ents.lua</a>
	</li>

	<li>
		<a href="../files/libs_cl/screen.html">libs_cl/screen.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/builtins.html">libs_sh/builtins.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/files.html">libs_sh/files.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/find.html">libs_sh/find.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/time.html">libs_sh/time.lua</a>
	</li>

	<li>
		<a href="../files/libs_sh/trace.html">libs_sh/trace.lua</a>
	</li>

	<li>
		<a href="../files/libs_sv/ents.html">libs_sv/ents.lua</a>
	</li>

	<li>
		<a href="../files/libs_sv/wire.html">libs_sv/wire.lua</a>
	</li>

	<li>
		<a href="../files/reload.html">reload.lua</a>
	</li>

</ul>






</div> <!-- id="navigation" -->

<div id="content">

<h1>File <code>Compiler.lua</code></h1>







<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#SF.Compiler.Compile">SF.Compiler.Compile</a>&nbsp;(code, context, mainfile, player, data, dontpreprocess)</td>
	<td class="summary">Preprocesses and Compiles code and returns an Instance </td>
	</tr>

</table>






<br/>
<br/>




<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="SF.Compiler.Compile"></a><strong>SF.Compiler.Compile</strong>&nbsp;(code, context, mainfile, player, data, dontpreprocess)</dt>
<dd>
Preprocesses and Compiles code and returns an Instance


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>code</em></code>: Either a string of code, or a {path=source} table
	</li>
	
	<li>
	  <code><em>context</em></code>: The context to use in the resulting Instance
	</li>
	
	<li>
	  <code><em>mainfile</em></code>: If code is a table, this specifies the first file to parse.
	</li>
	
	<li>
	  <code><em>player</em></code>: The "owner" of the instance
	</li>
	
	<li>
	  <code><em>data</em></code>: The table to set instance.data to. Default is a new table.
	</li>
	
	<li>
	  <code><em>dontpreprocess</em></code>: Set to true to skip preprocessing
	</li>
	
</ul>






<h3>Return values:</h3>
<ol>
	
	<li>True if no errors, false if errors occured.</li>
	
	<li>The compiled instance, or the error message.</li>
	
</ol>



</dd>


</dl>







</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>
